package com.company.modules.project.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * 部门
 * @TableName department
 */
public class Department implements Serializable {
    /**
     * 部门ID标识
     */
    private Integer id;

    /**
     * 所属公司ID
     */
    private Integer companyId;

    /**
     * 父级部门ID
     */
    private Integer parentId;

    /**
     * 部门名称
     */
    private String name;

    /**
     * 部门类别
     */
    private String category;

    /**
     * 部门所在城市
     */
    private String city;

    /**
     * 部门状态;部门状态，1表示正常，2表示解散
     */
    private Integer status;

    /**
     * 创建时间
     */
    private Date createTime;

    private static final long serialVersionUID = 1L;

    /**
     * 部门ID标识
     */
    public Integer getId() {
        return id;
    }

    /**
     * 部门ID标识
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 所属公司ID
     */
    public Integer getCompanyId() {
        return companyId;
    }

    /**
     * 所属公司ID
     */
    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }

    /**
     * 父级部门ID
     */
    public Integer getParentId() {
        return parentId;
    }

    /**
     * 父级部门ID
     */
    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    /**
     * 部门名称
     */
    public String getName() {
        return name;
    }

    /**
     * 部门名称
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 部门类别
     */
    public String getCategory() {
        return category;
    }

    /**
     * 部门类别
     */
    public void setCategory(String category) {
        this.category = category;
    }

    /**
     * 部门所在城市
     */
    public String getCity() {
        return city;
    }

    /**
     * 部门所在城市
     */
    public void setCity(String city) {
        this.city = city;
    }

    /**
     * 部门状态;部门状态，1表示正常，2表示解散
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 部门状态;部门状态，1表示正常，2表示解散
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Department other = (Department) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
            && (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getCategory() == null ? other.getCategory() == null : this.getCategory().equals(other.getCategory()))
            && (this.getCity() == null ? other.getCity() == null : this.getCity().equals(other.getCity()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
        result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getCategory() == null) ? 0 : getCategory().hashCode());
        result = prime * result + ((getCity() == null) ? 0 : getCity().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", companyId=").append(companyId);
        sb.append(", parentId=").append(parentId);
        sb.append(", name=").append(name);
        sb.append(", category=").append(category);
        sb.append(", city=").append(city);
        sb.append(", status=").append(status);
        sb.append(", createTime=").append(createTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
